package com.xiashuxia.orgims.action;

import java.util.ArrayList;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;

import com.opensymphony.xwork2.ActionSupport;
import com.xiashuxia.orgims.model.Department;
import com.xiashuxia.orgims.service.DepartmentService;

/*
 * 导航栏对应的action类
 */
@Scope("session")
@ParentPackage("struts-default")
@Namespace("/")
public class NavigationAction extends ActionSupport {

	/*
	 * 活动申请的action，初始化departmentList，MemberList，MaterialList
	 */
	@Action(value = "activityNavi", results = { @Result(location = "/orgLeader/activityApply.jsp") })
	public String activityNavi() {

		return "activityApply";
	}

	/*
	 * 报销申请的action，初始化可报销活动列表(activityList)
	 */
	@Action(value = "reimbursementNavi", results = { @Result(location = "/orgLeader/reimbursementApply.jsp") })
	public String reimbursementNavi() {
		
		return "reimbursementApply";
	}

	/*
	 * 社团部门列表
	 */
	private ArrayList<Department> deparmentList;

	/*
	 * 社团成员列表
	 */
	private ArrayList<Member> memberList;

	/*
	 * 库存物资列表
	 */
	private ArrayList<Material> materialList;

	/*
	 * 可报销活动列表
	 */
	private ArrayList<Activity> activityList;
	

	public ArrayList<Department> getDeparmentList() {
		return deparmentList;
	}

	public ArrayList<Member> getMemberList() {
		return memberList;
	}

	public ArrayList<Material> getMaterialList() {
		return materialList;
	}

	public ArrayList<Activity> getActivityList() {
		return activityList;
	}

	@Autowired
	private DepartmentService deparmentService;

	/**
	 * 自动的序列号
	 */
	private static final long serialVersionUID = -6089419913312117399L;
}
